import request from "@/utils/request";

// 公告列表 /notice/:page
export const getNoticeList = (page: number) => {
    return request({
        url: `/notice/${page}`,
        method: "get",
    });
};

// 新增 /notice
export const addNotice = (data: object) => {
    return request({
        url: `/notice`,
        method: "post",
        data
    });
};
// 修改
export const editNotice = (id: number, data: object) => {
    return request({
        url: `/notice/${id}`,
        method: "post",
        data
    });
};
// 删除
export const delNotice = (id: number) => {
    return request({
        url: `/notice/${id}/delete`,
        method: "post",
    });
};